<?php

//src/Rebecca/CrudGeneratorBundle/Command/RebeccaCrudCommand.php

namespace Rebecca\CustomGeneratorBundle\Command;

use Rebecca\CustomGeneratorBundle\Generator\RebecaDoctrineCrudGenerator;

class RebeccaCrudCommand extends \Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand {

    protected function configure() {
        parent::configure();
        $this->setName('rebecca:generate:crud');
    }

    protected function getGenerator() {
        $generator = new RebecaDoctrineCrudGenerator($this->getContainer()->get('filesystem'), __DIR__ . '/../Resources/skeleton/crud');
        $this->setGenerator($generator);
        return parent::getGenerator();
    }

}